package com.wing.order.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.wing.common.utils.JsonResult;
import com.wing.enterprise.product.model.response.ProductPackLabelVO;
import com.wing.order.model.entity.DistributionDemand;
import com.wing.order.model.request.DistributionDemandDetailForm;
import com.wing.order.model.request.DistributionDemandForm;
import com.wing.order.model.response.DistributionDemandVO;

import java.util.List;
import java.util.Map;

/**
 * 配货需求订单表-Service
 *
 * @author
 */
public interface DistributionDemandService extends IService<DistributionDemand> {

    /**
     * 添加
     *
     * @param distributionDemandForm
     * @return
     */
    int add(DistributionDemandForm distributionDemandForm);



    /**
     * 列表-app
     *
     * @param params
     *
     * @return
     */
    List<DistributionDemandVO> list4app(Map<String, Object> params);

    /**
     * 分页list-app
     *
     * @param page
     * @param params
     *
     * @return
     */
    Page<DistributionDemandVO> pageList4app(Page page, Map<String, Object> params);

    Page<DistributionDemandVO> pageListReceive4app(Page page, Map<String, Object> params);

    /**
     * 详情-app
     *
     * @param id
     *
     * @return
     */
    DistributionDemandVO get4appById(Long id);

    JsonResult<ProductPackLabelVO> getPackLabel(Long id,Long detailId,String labelCode);

    JsonResult addList(List<DistributionDemandDetailForm> distributionDemandDetailForms) throws Exception;

    void save(DistributionDemandForm distributionDemandForm);

    void update(DistributionDemandForm distributionDemandForm);

    JsonResult audit(Long id, DistributionDemand.Status status, String auditRemark);
}
